.class public Lcom/estrongs/android/ui/homepage/HomeManagerActivity;
.super Lcom/estrongs/android/ui/base/HomeAsBackActivity;
.source "HomeManagerActivity.java"

# interfaces
.implements Lcom/estrongs/android/ui/homepage/HomeManagerAdapter$d;
.implements Les/vk;


# instance fields
.field private j:Landroidx/recyclerview/widget/RecyclerView;

.field private k:Landroid/widget/TextView;

.field private l:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/android/ui/homepage/g;",
            ">;"
        }
    .end annotation
.end field

.field private m:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/android/ui/homepage/g;",
            ">;"
        }
    .end annotation
.end field

.field private n:Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;

.field private o:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private p:Landroidx/appcompat/widget/Toolbar;

.field private q:Z

.field private r:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->l:Ljava/util/List;

    .line 3
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->m:Ljava/util/List;

    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->q:Z

    const-string v0, ""

    .line 5
    iput-object v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->r:Ljava/lang/String;

    return-void
.end method

.method private F()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/estrongs/android/ui/homepage/h;->b()Lcom/estrongs/android/ui/homepage/h;

    move-result-object v0

    iget-object v1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->o:Ljava/util/List;

    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/homepage/h;->a(Ljava/util/List;)V

    .line 2
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    const-string v0, "sSuc"

    .line 3
    invoke-direct {p0, v0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->c(Ljava/lang/String;)V

    return-void
.end method

.method private G()V
    .locals 1

    .line 1
    invoke-static {}, Les/b00;->q()Les/b00;

    move-result-object v0

    invoke-virtual {v0}, Les/b00;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->F()V

    goto :goto_0

    :cond_0
    const-string v0, "palace_manage"

    .line 3
    invoke-static {p0, v0}, Lcom/estrongs/android/pop/app/premium/newui/ChinaMemberActivity;->a(Landroid/content/Context;Ljava/lang/String;)V

    :goto_0
    return-void
.end method

.method private H()V
    .locals 7

    .line 1
    sget-object v0, Lcom/estrongs/android/ui/homepage/h;->c:Ljava/util/Map;

    .line 2
    invoke-static {}, Lcom/estrongs/android/ui/homepage/h;->b()Lcom/estrongs/android/ui/homepage/h;

    move-result-object v1

    invoke-virtual {v1}, Lcom/estrongs/android/ui/homepage/h;->a()[Ljava/lang/String;

    move-result-object v1

    .line 3
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    if-eqz v1, :cond_1

    .line 4
    invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 5
    array-length v3, v1

    const/4 v4, 0x0

    :goto_0
    if-ge v4, v3, :cond_1

    aget-object v5, v1, v4

    .line 6
    invoke-interface {v0, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 7
    iget-object v6, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->l:Ljava/util/List;

    invoke-interface {v0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    invoke-interface {v6, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_0
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 8
    :cond_1
    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 9
    :cond_2
    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_3

    .line 10
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    .line 11
    invoke-interface {v0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/estrongs/android/ui/homepage/g;

    .line 12
    invoke-interface {v2, v3}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_2

    .line 13
    iget-object v3, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->m:Ljava/util/List;

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_1

    :cond_3
    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/homepage/HomeManagerActivity;)Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->n:Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;

    return-object p0
.end method

.method public static a(Landroid/app/Activity;Ljava/lang/String;)V
    .locals 2

    .line 2
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "from"

    .line 3
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 4
    invoke-virtual {p0, v0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method private c(Ljava/lang/String;)V
    .locals 3

    .line 1
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string v1, "from"

    .line 2
    iget-object v2, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->r:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    const-string v2, "unknown"

    goto :goto_0

    :cond_0
    iget-object v2, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->r:Ljava/lang/String;

    :goto_0
    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v1, "action"

    .line 3
    invoke-virtual {v0, v1, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 4
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object p1

    const-string v1, "hmfMkey"

    invoke-virtual {p1, v1, v0}, Lcom/estrongs/android/statistics/b;->c(Ljava/lang/String;Lorg/json/JSONObject;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    return-void
.end method


# virtual methods
.method protected D()Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public synthetic a(Landroid/content/DialogInterface;I)V
    .locals 0

    .line 7
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    .line 8
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    const-string p1, "edEClk"

    .line 9
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->c(Ljava/lang/String;)V

    return-void
.end method

.method public synthetic a(Landroid/view/View;)V
    .locals 0

    .line 5
    invoke-direct {p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->G()V

    const-string p1, "sClk"

    .line 6
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->c(Ljava/lang/String;)V

    return-void
.end method

.method public a(Z)V
    .locals 0

    .line 10
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->o:Ljava/util/List;

    if-eqz p1, :cond_0

    .line 11
    invoke-direct {p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->F()V

    :cond_0
    return-void
.end method

.method public synthetic b(Landroid/content/DialogInterface;I)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->G()V

    .line 2
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    const-string p1, "edSClk"

    .line 3
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->c(Ljava/lang/String;)V

    return-void
.end method

.method public d(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->o:Ljava/util/List;

    .line 2
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->k:Landroid/widget/TextView;

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setEnabled(Z)V

    .line 3
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->k:Landroid/widget/TextView;

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setFocusable(Z)V

    return-void
.end method

.method public synthetic e(Z)V
    .locals 0

    invoke-static {p0, p1}, Les/uk;->a(Les/vk;Z)V

    return-void
.end method

.method public synthetic h()V
    .locals 0

    invoke-static {p0}, Les/uk;->b(Les/vk;)V

    return-void
.end method

.method public onBackPressed()V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->o:Ljava/util/List;

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->q:Z

    if-eqz v0, :cond_0

    .line 2
    new-instance v0, Lcom/estrongs/android/ui/dialog/q$n;

    invoke-direct {v0, p0}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    const v1, 0x7f11072b

    .line 3
    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(I)Lcom/estrongs/android/ui/dialog/q$n;

    const v1, 0x7f1105e8

    new-instance v2, Lcom/estrongs/android/ui/homepage/b;

    invoke-direct {v2, p0}, Lcom/estrongs/android/ui/homepage/b;-><init>(Lcom/estrongs/android/ui/homepage/HomeManagerActivity;)V

    .line 4
    invoke-virtual {v0, v1, v2}, Lcom/estrongs/android/ui/dialog/q$n;->c(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    const v1, 0x7f110066

    new-instance v2, Lcom/estrongs/android/ui/homepage/c;

    invoke-direct {v2, p0}, Lcom/estrongs/android/ui/homepage/c;-><init>(Lcom/estrongs/android/ui/homepage/HomeManagerActivity;)V

    .line 5
    invoke-virtual {v0, v1, v2}, Lcom/estrongs/android/ui/dialog/q$n;->e(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 6
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q$n;->a()Lcom/estrongs/android/ui/dialog/q;

    move-result-object v0

    .line 7
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    const/4 v0, 0x0

    .line 8
    iput-boolean v0, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->q:Z

    const-string v0, "edShow"

    .line 9
    invoke-direct {p0, v0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->c(Ljava/lang/String;)V

    return-void

    .line 10
    :cond_0
    invoke-super {p0}, Landroidx/activity/ComponentActivity;->onBackPressed()V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f0c0034

    .line 2
    invoke-virtual {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->setContentView(I)V

    const p1, 0x7f1104f2

    .line 3
    invoke-virtual {p0, p1}, Landroid/app/Activity;->setTitle(I)V

    const p1, 0x7f090bdd

    .line 4
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroidx/appcompat/widget/Toolbar;

    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->p:Landroidx/appcompat/widget/Toolbar;

    .line 5
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESActivity;->setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V

    const p1, 0x7f0904c8

    .line 6
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroidx/recyclerview/widget/RecyclerView;

    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->j:Landroidx/recyclerview/widget/RecyclerView;

    .line 7
    new-instance p1, Landroidx/recyclerview/widget/GridLayoutManager;

    const/4 v0, 0x0

    const/4 v1, 0x4

    const/4 v2, 0x1

    invoke-direct {p1, p0, v1, v2, v0}, Landroidx/recyclerview/widget/GridLayoutManager;-><init>(Landroid/content/Context;IIZ)V

    .line 8
    new-instance v1, Lcom/estrongs/android/ui/homepage/HomeManagerActivity$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity$a;-><init>(Lcom/estrongs/android/ui/homepage/HomeManagerActivity;)V

    invoke-virtual {p1, v1}, Landroidx/recyclerview/widget/GridLayoutManager;->setSpanSizeLookup(Landroidx/recyclerview/widget/GridLayoutManager$SpanSizeLookup;)V

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->j:Landroidx/recyclerview/widget/RecyclerView;

    invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V

    .line 10
    new-instance p1, Lcom/estrongs/android/ui/homepage/ItemDragHelperCallback;

    invoke-direct {p1}, Lcom/estrongs/android/ui/homepage/ItemDragHelperCallback;-><init>()V

    .line 11
    new-instance v1, Landroidx/recyclerview/widget/ItemTouchHelper;

    invoke-direct {v1, p1}, Landroidx/recyclerview/widget/ItemTouchHelper;-><init>(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;)V

    .line 12
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->j:Landroidx/recyclerview/widget/RecyclerView;

    invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ItemTouchHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V

    .line 13
    invoke-direct {p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->H()V

    .line 14
    new-instance p1, Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;

    iget-object v2, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->l:Ljava/util/List;

    iget-object v3, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->m:Ljava/util/List;

    invoke-direct {p1, v2, v3, v1}, Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;-><init>(Ljava/util/List;Ljava/util/List;Landroidx/recyclerview/widget/ItemTouchHelper;)V

    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->n:Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;

    .line 15
    invoke-virtual {p1, p0}, Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;->a(Lcom/estrongs/android/ui/homepage/HomeManagerAdapter$d;)V

    .line 16
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->j:Landroidx/recyclerview/widget/RecyclerView;

    iget-object v1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->n:Lcom/estrongs/android/ui/homepage/HomeManagerAdapter;

    invoke-virtual {p1, v1}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V

    const p1, 0x7f0901a7

    .line 17
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->k:Landroid/widget/TextView;

    .line 18
    new-instance v1, Lcom/estrongs/android/ui/homepage/a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/homepage/a;-><init>(Lcom/estrongs/android/ui/homepage/HomeManagerActivity;)V

    invoke-virtual {p1, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 19
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->k:Landroid/widget/TextView;

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setEnabled(Z)V

    .line 20
    iget-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->k:Landroid/widget/TextView;

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setFocusable(Z)V

    .line 21
    invoke-static {}, Les/b00;->q()Les/b00;

    move-result-object p1

    invoke-virtual {p1, p0}, Les/b00;->a(Les/vk;)V

    .line 22
    invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object p1

    const-string v0, "from"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->r:Ljava/lang/String;

    .line 23
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-eqz p1, :cond_0

    const-string p1, "TBD"

    .line 24
    iput-object p1, p0, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->r:Ljava/lang/String;

    :cond_0
    const-string p1, "pShow"

    .line 25
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->c(Ljava/lang/String;)V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onDestroy()V

    .line 2
    invoke-static {}, Les/b00;->q()Les/b00;

    move-result-object v0

    invoke-virtual {v0, p0}, Les/b00;->b(Les/vk;)V

    return-void
.end method

.method public synthetic onFinish()V
    .locals 0

    invoke-static {p0}, Les/uk;->a(Les/vk;)V

    return-void
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 2

    .line 1
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v0

    const v1, 0x102002c

    if-ne v0, v1, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/estrongs/android/ui/homepage/HomeManagerActivity;->onBackPressed()V

    const/4 p1, 0x1

    return p1

    .line 3
    :cond_0
    invoke-super {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onOptionsItemSelected(Landroid/view/MenuItem;)Z

    move-result p1

    return p1
.end method
